<template>
  <div class="table">
    <div class="content">
      <table-content />
    </div>
  </div>
</template>
<script setup>
import TableContent from './file-relation-db-modal-content-detail-table-content.vue'
import { useColumns } from './provide-context.js'
let columns = useColumns()
columns.value = [
  {
    title: '名称',
    dataIndex: 'dataName',
    key: 'dataName',
    fixed: 'left',
    width: 200,
    sorter: true,
    showSorterTooltip: {
      title: '按首字母排序',
    },
    checked: true,
    // sortDirections: ['name-descend', 'name-ascend'],
  },
  {
    title: '文件类型',
    dataIndex: 'fileType',
    key: 'fileType',
    width: 150,
    sorter: true,
    showSorterTooltip: {
      title: '按首字母排序',
    },
    // sortDirections: ['descend', 'ascend'],
    filters: [
      { text: '文件类型1', value: '1' },
      { text: '文件类型2', value: '2' },
      { text: '文件类型3', value: '3' },
    ],
    filterMultiple: false,
    filteredValue: null,
    checked: true,
  },
  {
    title: '编码',
    dataIndex: 'dataId',
    key: 'dataId',
    width: 180,
    checked: true,
  },
  {
    title: '上传时间',
    dataIndex: 'gmtCreate',
    key: 'gmtCreate',
    width: 180,
    sorter: true,
    checked: true,
    // sortDirections: ['descend', 'ascend'],
  },
  {
    title: '版本',
    dataIndex: 'version',
    key: 'version',
    width: 100,
    sorter: true,
    checked: true,
    // sortDirections: ['descend', 'ascend'],
  },
  {
    title: '修改时间',
    dataIndex: 'mmtCreate',
    key: 'mmtCreate',
    width: 180,
    sorter: true,
    checked: true,
    // sortDirections: ['descend', 'ascend'],
  },
  // {
  //   title: '状态',
  //   dataIndex: 'dataStatus',
  //   key: 'dataStatus',
  //   width: 100,
  //   filters: [
  //     { text: '已发布', value: 'publish' },
  //     { text: '占用', value: 'occupy' },
  //   ],
  //   filterMultiple: false,
  //   filteredValue: null,
  //   checked: true,
  // },
  // {
  //   title: '备注',
  //   dataIndex: 'note',
  //   key: 'note',
  //   width: 200,
  //   checked: true,
  // },
  // {
  //   title: '文件大小',
  //   dataIndex: 'fileSize',
  //   key: 'fileSize',
  //   width: 150,
  //   sorter: true,
  //   // sortDirections: ['descend', 'ascend'],
  //   showSorterTooltip: {
  //     title: '按大小排序',
  //   },
  //   checked: true,
  // },
  // {
  //   title: '操作',
  //   dataIndex: 'operation',
  //   key: 'operation',
  //   fixed: 'right',
  //   width: 120,
  // },
]
</script>
<style lang="less" scoped>
.table {
  height: 100%;
  display: flex;
  flex-direction: column;
  .content {
    flex: 1;
    overflow: hidden;
    margin-top: 16px;
  }
}
</style>
